﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Admin_xemthongbao : System.Web.UI.Page
{
    string id = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!Page.IsPostBack)
            {
                id = Request.QueryString["func"].ToString();
                nhapDanhSach();
            }
        }
        catch
        {
            nhapDanhSach();
            //Response.Redirect("gioithieu.aspx");
        }
    }
    protected void nhapDanhSach()
    {
        clsTableAction clsTable = new clsTableAction("ThongBao");
        clsTable.exportDataToGridviewPaging(0, 5, ref GridView1, "*", "");
        clsTable.free();
    }

    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        clsTableAction clsTable = new clsTableAction("ThongBao");

        clsTable.exportDataToGridviewPaging(e.NewPageIndex, 5, ref GridView1, "*", "");
        clsTable.free();
    }
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Attributes.Add("onmouseover", "javascript:this.className = 'rowStyleHover'");
            e.Row.Attributes.Add("onmouseout", "javascript:this.className = 'rowStyle'");
        }
    }
}